<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My First Ajax using the YUI Library</title>
<script src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js" type="text/javascript"></script>
<script src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js" type="text/javascript"></script>
<script src="http://yui.yahooapis.com/2.2.2/build/connection/connection-min.js" type="text/javascript"></script>
</head>
<body>
<div id="mydiv">
</div>
<p><a href="/include.html" onclick="callAJAX(); return false;">My first AJAX</a></p>

<script type="text/javascript">
//<![CDATA[

var sUrl = "include.html";

var callback = {
success: function(o) {
	// alert("AJAX Works"); //SUCCESS
	document.getElementById('mydiv').innerHTML =  o.responseText;
	},
	failure: function(o) {
	alert("AJAX doesn't work"); //FAILURE
}
}

// var transaction = 
	YAHOO.util.Connect.asyncRequest('GET', sUrl, callback, null);

//]]>
</script>
</body>
</html>